package 曾世昌12_20.demo2;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;
import java.util.Scanner;

public class test {
    public static void main(String[] args) throws IOException {
        System.out.println( "请输入图片地址：" );
        Scanner scanner = new Scanner( System.in );
        String s = scanner.nextLine();
        byte[] bytes = FileUtils.readFileToByteArray( new File( s ) );
        if (bytes.length > 1024 * 2) {
            System.out.println( "请重新上传！" );
            return;
        } else {
            fuwu.run( bytes );
        }
    }
}
